package cn.smile.bean.form.core.user;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * @author smile-jt
 */
@Data
public class RegisterUserForm {

    /**
     * 登录账号
     */
    @NotBlank(message = "请输入登陆账号")
    @Pattern(regexp = "^[a-zA-Z0-9_-]{4,16}$", message = "登陆账号格式有误")
    private String loginId;

    /**
     * 昵称
     */
    @Length(max = 50, message = "昵称必须0-50个字符")
    private String nickName;

    /**
     * 密码
     */
    @NotBlank(message = "请输入登录密码")
    @Length(min = 8, max = 20, message = "登录密码必须8-20个字符")
    private String password;
}
